#ifndef __MAX30102_H
#define __MAX30102_H

#define MAX30102_ADDRESS 0x57
#define MAX30102_ADDRESS_W 0xAE
#define MAX30102_ADDRESS_R 0xAF
#include "stdint.h"
#include "i2c.h"
#include <stdbool.h>



void MAX30102_Init();

uint32_t checkmode();

uint8_t MAX30102_Get_Data_Count(uint8_t* data_count);

uint8_t MAX30102_Read_Data(uint32_t *ir_adc, uint32_t *red_adc);

void MAX30102_Data_Init();
bool MAX30102_Update_Data(uint32_t ir_value, uint32_t red_value);
void MAX30102_Get_Results(uint8_t *heart_rate, uint8_t *spo2);

#endif